package com.esri.core.internal.tasks.ags.c;

import com.esri.core.internal.tasks.TaskListener;
import com.esri.core.io.UserCredentials;
import com.esri.core.map.FeatureSet;
import org.codehaus.jackson.JsonParser;

/* loaded from: classes.dex */
public class h extends com.esri.core.internal.tasks.d<FeatureSet> {
    private static final long serialVersionUID = 1;

    public h(i iVar, String str, UserCredentials userCredentials, TaskListener<FeatureSet> taskListener) {
        super(iVar, str, userCredentials, taskListener);
    }

    public h(i iVar, String str, UserCredentials userCredentials) {
        super(iVar, str, userCredentials);
    }

    @Override // com.esri.core.internal.tasks.a
    /* renamed from: a */
    public FeatureSet execute() throws Exception {
        JsonParser jsonParser = null;
        try {
            StringBuilder sb = new StringBuilder();
            sb.append(this.serviceURL);
            sb.append(((i) this.actionInput).c() ? "/dynamicLayer" : "");
            sb.append("/query");
            jsonParser = com.esri.core.internal.io.handler.h.b(sb.toString(), this.actionInput.generateRequestParams(), getServiceCredentials());
            return FeatureSet.fromJson(jsonParser, ((i) this.actionInput).a());
        } finally {
            if (jsonParser != null) {
                jsonParser.close();
            }
        }
    }
}
